package edu.cornell.cs4740.postag.parsing;

import java.util.ArrayList;
import java.util.List;

public class Sentence {
  private List<WordContainer> words;
  
  public Sentence() {
    words = new ArrayList<WordContainer>();
  }
  
  public Sentence(WordContainer firstWord) {
    this();
    words.add(firstWord);
  }
  
  public Sentence(List<WordContainer> allWords) {
    words = allWords;
  }
  
  public void addWord(WordContainer nextWord) {
    words.add(nextWord);
  }
  
  public void addAllWords(List<WordContainer> allWords) {
    words = allWords;
  }
  
  public int getLength() {
    return words.size();
  }
  
  public WordContainer getWord(int i) {
    if (i < words.size()) {
      return words.get(i);
    }
    return null;
  }
  
  public List<WordContainer> getAllWords() {
    return words;
  }
}
